<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml"
      dir="ltr" lang="en-US" xml:lang="en"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:p="http://primefaces.org/ui"
      xmlns:x="http://xpert.com/faces"
      xmlns:o="http://omnifaces.org/ui"
      >

    <f:view locale="#{localeBean.locale}">
        <h:head>
            <ui:include src="imports.xhtml"/>
        </h:head>
        <h:body>
            <ui:include src="/template/ajaxStatus.xhtml" />  
            <header>
                <ui:insert name="header">
                    <div class="row">
                        <div class="col-lg-6 col-md-6 col-sm-6 col-xs-12 pull-left text-left logo">
                            <h:graphicImage value="/images/logo.png" alt="Logo" />
                        </div>
                        <div class="col-lg-6 col-md-6 col-sm-6 col-xs-12 pull-right text-right info">
                            <h:panelGroup  rendered="#{not empty sessaoUsuarioMB.user}">
                                <h:outputText value="#{sessaoUsuarioMB.user.nome}"/><br/>
                                <h:outputText value="#{now}" styleClass="font-11">
                                    <f:convertDateTime dateStyle="full" type="both" />
                                </h:outputText>
                            </h:panelGroup>                            
                        </div>
                    </div>
                </ui:insert>
            </header>

            <h:panelGroup rendered="#{not empty sessaoUsuarioMB.user}">  
                <ui:insert name="menu">
                    <h:panelGroup>
                        <ui:include src="menu.xhtml"/>
                    </h:panelGroup>
                </ui:insert> 
            </h:panelGroup> 

            <section class="conteiner conteudo">
                <h:panelGroup rendered="#{not empty title}">
                    <div class="row">
                        <div class="col-lg-12">
                            <h1 class="page-header">
                                #{title}
                            </h1>
                        </div>
                    </div>
                </h:panelGroup>
                <div class="row">
                    <div class="col-lg-12">
                        <ui:insert name="body" />
                    </div>
                </div>
            </section>
            <div class="clearfix"></div>
            <footer>
                <div class="row">
                    <div class="col-lg-12 text-center">
                        Powered by <a href="https://code.google.com/p/xpert-framework/" target="_blank">xpert-framework</a>
                    </div>
                </div>
            </footer>

            <x:filterOnEnter/>
        </h:body>
    </f:view>

</html>